﻿using Common.Base;

using Microsoft.Xna.Framework;

namespace Common.Extensions
{
    public static class RectangleExtension
    {
        public static bool IsPointInRectangle(this Rectangle rect, Position pos)
        {
            if (pos.X > rect.X && pos.X < rect.X + rect.Width && pos.Y > rect.Y && pos.Y < rect.Y + rect.Height)
            {
                return true;
            }

            return false;
        }
    }
}